﻿@inherits BaseComponent

<ul class="kui-app-menu">
    @if (Items != null && Items.Count > 0)
    {
        foreach (var item in Items)
        {
            if (item.Target != "Menu" || !item.Visible)
                continue;

            <li @onclick="e=>OnItemClick(item)" style="width:@(Width)%">
                @if (item.Badge > 0)
                {
                    <Badge Count="item.Badge">
                        <div class="kui-app-menu-icon" style="background-color:@item.Color">
                            <Icon Type="@item.Icon" Theme="IconThemeType.Outline" />
                        </div>
                    </Badge>
                }
                else
                {
                    <div class="kui-app-menu-icon" style="background-color:@item.Color">
                        <Icon Type="@item.Icon" Theme="IconThemeType.Outline" />
                    </div>
                }
                <div>@item.Name</div>
            </li>
        }
    }
</ul>